﻿using Wizard.Runtime;
using Wizard.Statements;
using Wizard.Compiler.Parsers;
using Wizard.Source;

namespace Wizard.Functions
{
    using Wizard.Runtime;

    public class GetVar<ResultType> : Function<ResultType>
    {
        private IBlockSource mBlock;
        private IBlockVariable mVariable;

        public GetVar(IBlockSource block, IBlockVariable variable)
            : base(variable.Name, FunctionType.variable)
        {
            mBlock = block;
            mVariable = variable;
        }

        protected override ResultType RecalcValue(IRunContext context)
        {
            //blockInstance.GetVariableValue(mVariable);
            return default(ResultType);
        }

        private void OnValueChanged(object sender, IValueChangedEventArgs e)
        {
            base.SetModified(sender, e);
        }
    }
}